﻿/**
 * @brief     网络配置操作类
 * @details   用于获取网络相关的配置信息，如IP等
 * @author    Yin
 * @version   1.0
 * @date
 * @copyright
 * @note
 */

#ifndef NETWORKCONFIG_H
#define NETWORKCONFIG_H

#include "common_global.h"

#include <QObject>
#include <QHostInfo>
#include <QNetworkInterface>

namespace Common {

	class COMMONSHARED_EXPORT NetworkConfig : public QObject
	{
		Q_OBJECT
	public:
		explicit NetworkConfig(QObject *parent = nullptr);
		~NetworkConfig();

	public:
		/**
		 * @brief getHostName 获取主机名
		 * @return
		 */
		static QString getHostName();

		/**
		 * @brief getLocalIP 获取本地Ip
		 * @return
		 */
		static QString getLocalIP();

		/**
		 * @brief getIpList
		 * @return
		 */
		static QStringList getIpList(QString strHostName);

	};

}//namespace Common

#endif // NETWORKCONFIG_H
